package com.jg.visitor.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jg.visitor.common.bean.PhoneCountBean;
import com.jg.visitor.controller.vo.AdminQueryVO;
import com.jg.visitor.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author cqj
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    /**
     * 根据条件分页查询
     */
    List<User> selectByCondition(Page<User> page, @Param("condition") AdminQueryVO adminQueryVO,@Param("user") User loginUserDetailInfo);

    /**
     * 根据条件查询全部
     */
    List<User> selectByCondition(@Param("condition") AdminQueryVO adminQueryVO,@Param("user") User loginUserDetailInfo);

    /**
     * 批量查询手机号对应是否存在账号
     */
    List<PhoneCountBean> batchSelectPhoneCount(@Param("phoneList") List<String> phoneList);

    /**
     * 批量保存
     */
    void saveBatch(@Param("entityList")List<User> entityList);
}




